package com.test.domain;

import lombok.Data;

import java.io.Serializable;

/**
 * 部门表
 * @TableName dept
 */
@Data
public class Dept extends Base implements Serializable {
    private static final long serialVersionUID = 1L;
    /**
     * 部门ID
     */
    private Integer id;
    /**
     * 部门名称
     */
    private String name;

    @Override
    public boolean equals(Object that) {
        if (this == that) {
            return true;
        }
        if (that == null) {
            return false;
        }
        if (getClass() != that.getClass()) {
            return false;
        }
        Dept other = (Dept) that;
        return (this.getId() == null ? other.getId() == null : this.getId().equals(other.getId()))
            && (this.getName() == null ? other.getName() == null : this.getName().equals(other.getName()));
    }

    @Override
    public int hashCode() {
        final int prime = 31;
        int result = 1;
        result = prime * result + ((getId() == null) ? 0 : getId().hashCode());
        result = prime * result + ((getName() == null) ? 0 : getName().hashCode());
        return result;
    }

    @Override
    public String toString() {
        String sb = getClass().getSimpleName() + " [" + "Hash = " + hashCode() + ", id=" + id + ", name=" + name + ", serialVersionUID=" + serialVersionUID + "]";
        return sb;
    }
}